fix(server): keep malformed usage sources from disconnecting clients - #11368
fix(server): keep malformed usage sources from disconnecting clients#11368shivamhwp wants to merge 1 commit into
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The change is a small, isolated server bug fix that supplies valid fallback labels for malformed or hostless usage-source URLs, preventing configuration events from disconnecting clients. Existing labels and normal URL handling remain unchanged, and the added regression test covers the affected cases. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
A usage source URL such as
localhost:8317parses with an empty host. Its empty display label fails config-event encoding, disconnecting configuration subscribers and causing the client to reconnect.Fall back to the source ID when the parsed host is empty, with a readable fallback for a blank ID. Keep the source error visible. This does not repair the configured URL or change management-key handling.
The regression exercises the real usage source service and encodes its config event. All 13 focused usage tests pass; the regression fails on the parent. Targeted lint, format and diff checks pass. Server typecheck passes.
Refs #10193. Stacked on #11298. Internal Fable refinement pending.
GPT-6 via Codex in T3 Code.